import { Result, deleteRequest, get, post, put } from "../../base";
/**
 * 分页查询
 * @param query .
 * @returns .
 */
export function findAll<T>(): Promise<Result<T>> {
  return get("/sci/paper/conference/all", {});
}
/**
 * 分页查询
 * @param query .
 * @returns .
 */
export function queryPage<T>(query?: any): Promise<Result<T>> {
  return get("/sci/paper/conference/query/page", query);
}
/**
 * 新增
 * @param data .
 * @returns .
 */
export function save<T>(data: any): Promise<Result<T>> {
  return post("/sci/paper/conference/save", data);
}
/**
 * 更新
 * @param id .
 * @param data .
 * @returns  .
 */
export function update<T>(id: string, data: any): Promise<Result<T>> {
  return put(`/sci/paper/conference/update/${id}`, {}, data);
}

/**
 * 删除用户
 * @param userIds .
 * @returns
 */
export function del<T>(userIds: string[]): Promise<Result<T>> {
  return deleteRequest(`/sci/paper/conference/delete`, {}, userIds);
}
/**
 * 导出
 * @param data .
 * @returns .
 */
export function exportData<T>(data: any): Promise<Result<T>> {
  return post("/sci/paper/conference/exportData", data, {
    responseType: "blob"
  });
}
